for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import { snakeCase } from 'lodash'
const apiHandler = {
get: (target, prop, receiver) => {
receiver
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.
if (prop in target) {
return target[prop]
}
const { client, api } = target
return params => client.send(api, snakeCase(prop), params)
},
ownKeys: target => {
return Reflect.ownKeys(target)
const factoryApiMethods = (client, api) => {
return new Proxy({ client, api }, apiHandler)
export { factoryApiMethods }
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.